<extend name="Layout/application"/>
<block name="content">
    <!-- content start -->
    <div class="admin-content">
        <div class="admin-content-body">
            <div class="am-cf am-padding am-padding-bottom-0">
                <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">通知</strong> /
                    <small>Notice</small>
                </div>
            </div>

            <hr>


            <form action="" method="get">
                <div class="am-g">
                    <div class="am-u-sm-12 am-u-md-6">
                        <div class="am-btn-toolbar">
                            <div class="am-btn-group am-btn-group-xs">
                                <a type="button" class="am-btn am-btn-default"
                                   href="{{:URL('admin/HomNotice/add_notice')}}"><span class="am-icon-plus"></span> 新增
                                </a>
                                <button type="button" class="am-btn am-btn-default"><span
                                        class="am-icon-trash-o"></span> 删除
                                </button>
                            </div>
                        </div>
                    </div>
                    <div class="am-u-sm-12 am-u-md-3">
                        <div class="am-form-group">
                            <select data-am-selected="{btnSize: 'sm'}" name="notice_node_id">
                                <option value="">所有分类</option>
                                <volist name="nodes" id="node">
                                <option value="{{$node->id}}" <eq name="node.id" value="$Request.param.notice_node_id"> selected </eq> >{{$node->name}}</option>
                                </volist>
                            </select>

                        </div>
                    </div>
                    <div class="am-u-sm-12 am-u-md-3">
                        <div class="am-input-group am-input-group-sm">
                            <input type="text" name="title" placeholder="按通知标题" class="am-form-field" value="{{$Request.param.title}}">
                            <span class="am-input-group-btn">
            <button class="am-btn am-btn-default" type="submit">搜索</button>
          </span>
                        </div>
                    </div>
                </div>
            </form>

            <div class="am-g">
                <div class="am-u-sm-12">
                    <form class="am-form">
                        <table class="am-table am-table-striped am-table-hover table-main">
                            <thead>
                            <tr>
                                <th class="table-check"><input type="checkbox"/></th>
                                <th class="table-id">ID</th>
                                <th class="table-title">名称</th>
                                <th class="table-type">分类</th>
                                <th class="table-date am-hide-sm-only">时间</th>
                                <th class="table-set">操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            <volist name="notices" id="notice">
                                <tr>
                                    <td><input type="checkbox"/></td>
                                    <td>{{$notice->id}}</td>
                                    <td><a href="#">{{$notice->title}}</a></td>
                                    <td>{{$notice->notice_node->name}}</td>
                                    <td class="am-hide-sm-only">{{$notice->create_time}}</td>
                                    <td>
                                        <div class="am-btn-toolbar">
                                            <div class="am-btn-group am-btn-group-xs">
                                                <a class="am-btn am-btn-default am-btn-xs am-text-secondary"
                                                   href="{{:URL('admin/HomNotice/edit',['id'=>$notice.id])}}"><span
                                                        class="am-icon-pencil-square-o"></span> 编辑
                                                </a>
                                                </button>
                                                <a class="am-btn am-btn-default am-btn-xs am-text-danger am-hide-sm-only"
                                                   href="{{:URL('admin/HomNotice/delete',['id'=>$notice.id])}}">
                                                    <span class="am-icon-trash-o"></span> 删除
                                                </a>
                                            </div>
                                        </div>
                                    </td>
                                </tr>
                            </volist>
                            </tbody>
                        </table>
                        <div class="am-cf">
                            共 15 条记录
                            <div class="am-fr">
                                <ul class="am-pagination">
                                    {{$notices|raw}}
                                </ul>
                            </div>
                        </div>
                        <hr/>
                        <p>注：.....</p>
                    </form>
                </div>

            </div>
        </div>

        <footer class="admin-content-footer">
            <hr>
            <p class="am-padding-left">© 2014 AllMobilize, Inc. Licensed under MIT license.</p>
        </footer>

    </div>
    <!-- content end -->

</block>

